package algutil.bean;

import java.sql.ResultSet;
import java.sql.SQLException;

/**@deprecated*/
public class ReleaseBean {

	private int id;

	private String nom;

	private int idGroupe;

	private int annee = 0;

	private int idStyle = -1;

	private int idLabel = -1;

	private String image = null;

	private String commentaire = null;

	private int idType;

	public ReleaseBean() {}
	
	public ReleaseBean(ResultSet rs) throws SQLException {
		setRelease(rs);
	}

	public int getId() {
		return id;
	}

	public void setId(int i) {
		id = i;
	}

	public String getNom() {
		return nom;
	}

	public void setNom(String n) {
		nom = n;
	}

	public int getIdGroupe() {
		return idGroupe;
	}

	public void setIdGroupe(int g) {
		idGroupe = g;
	}

	public int getAnnee() {
		return annee;
	}

	public void setAnnee(int a) {
		annee = a;
	}

	public int getIdStyle() {
		return idStyle;
	}

	public void setIdStyle(int s) {
		idStyle = s;
	}

	public int getIdLabel() {
		return idLabel;
	}

	public void setIdLabel(int l) {
		idLabel = l;
	}

	public String getImage() {
		return image;
	}

	public void setImage(String i) {
		image = i;
	}

	public String getCommentaire() {
		return commentaire;
	}

	public void setCommentaire(String c) {
		commentaire = c;
	}

	public int getIdType() {
		return idType;
	}

	public void setIdType(int t) {
		idType = t;
	}

	public void setRelease(ResultSet rs) throws SQLException {
		setId(rs.getInt("al_id"));
		setNom(rs.getString("al_nom"));
		setIdGroupe(rs.getInt("al_gr_id"));
		setAnnee(rs.getInt("al_annee"));
		setIdStyle(rs.getInt("al_st_id"));
		setIdLabel(rs.getInt("al_la_id"));
		setImage(rs.getString("al_image"));
		setCommentaire(rs.getString("al_commentaire"));
		setIdType(rs.getInt("al_ty_id"));
	}

	public String toString() {
		return "[" + id + "] " + nom + " (" + annee + ")";
	}
}